import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home.vue'
import Dianying from '../views/dianying.vue'
import Guangbo from '../views/guangbo.vue'
import Login from '../views/login.vue'
import Sousuo from '../views/sousuo.vue'
import Tushu from '../views/tushu.vue'
import Xiangqing from '../views/xiangqing.vue'
import Xiaozu from '../views/xiaozu.vue'
import Zhuce from '../views/zhuce.vue'
import No from '../views/no.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/dianying',
    name: 'Dianying',
    component: Dianying
  },
  {
    path: '/guangbo',
    name: 'Guangbo',
    component: Guangbo
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/sousuo',
    name: 'Sousuo',
    component: Sousuo
  },
  {
    path: '/tushu',
    name: 'Tushu',
    component: Tushu
  },
  {
    path: '/xiangqing/:xiaoming',
    name: 'Xiangqing',
    component: Xiangqing
  },
  {
    path: '/xiaozu',
    name: 'Xiaozu',
    component: Xiaozu
  },
  {
    path: '/zhuce',
    name: 'Zhuce',
    component: Zhuce
  },
  {path:"/",redirect:"/home"},
  {
    path: '/*',
    name: 'No',
    component: No
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
